<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <!-- Required meta tags-->
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="au theme template">
    <meta name="author" content="Hau Nguyen">
    <meta name="keywords" content="au theme template">

    <!-- Title Page-->
    <title>新建订单</title>

    <!-- Fontfaces CSS-->
    <link th:href="@{css/font-face.css}" rel="stylesheet" media="all">
    <link th:href="@{vendor/font-awesome-4.7/css/font-awesome.min.css}" rel="stylesheet" media="all">
    <link th:href="@{vendor/font-awesome-5/css/fontawesome-all.min.css}" rel="stylesheet" media="all">
    <link th:href="@{vendor/mdi-font/css/material-design-iconic-font.min.css}" rel="stylesheet" media="all">

    <!-- Bootstrap CSS-->
    <link th:href="@{vendor/bootstrap-4.1/bootstrap.min.css}" rel="stylesheet" media="all">

    <!-- Vendor CSS-->
    <link th:href="@{vendor/animsition/animsition.min.css}" rel="stylesheet" media="all">
    <link th:href="@{vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css}" rel="stylesheet" media="all">
    <link th:href="@{vendor/wow/animate.css}" rel="stylesheet" media="all">
    <link th:href="@{vendor/css-hamburgers/hamburgers.min.css}" rel="stylesheet" media="all">
    <link th:href="@{vendor/slick/slick.css}" rel="stylesheet" media="all">
    <link th:href="@{vendor/select2/select2.min.css}" rel="stylesheet" media="all">
    <link th:href="@{vendor/perfect-scrollbar/perfect-scrollbar.css}" rel="stylesheet" media="all">

    <!-- Main CSS-->
    <link th:href="@{css/theme.css}" rel="stylesheet" media="all">

    <script th:src="@{laydate/laydate.js}"></script>

    <script>
        laydate.render({
            elem: '#end_date' //指定元素
        });
    </script>

</head>
<body class="animsition">
<div class="page-wrapper">
    <!-- HEADER MOBILE-->
    <header class="header-mobile d-block d-lg-none">
        <div class="header-mobile__bar">
            <div class="container-fluid">
                <div class="header-mobile-inner">
                    <a class="logo" href="/index">
                        <!-- <img src="images/icon/logo.png" alt="CoolAdmin" /> -->
                        <h1>502畜牧养殖基地管理平台</h1>
                    </a>
                    <button class="hamburger hamburger--slider" type="button">
                            <span class="hamburger-box">
                                <span class="hamburger-inner"></span>
                            </span>
                    </button>
                </div>
            </div>
        </div>
    </header>
    <!-- END HEADER MOBILE-->

    <!-- MENU SIDEBAR-->
    <aside class="menu-sidebar d-none d-lg-block">
        <div class="logo">
            <a href="index.html">
                <!-- <img src="images/icon/logo.png" alt="Cool Admin" /> -->
                <h4>502畜牧养殖基地管理平台</h4>
            </a>
        </div>
        <div class="menu-sidebar__content js-scrollbar1">
            <nav class="navbar-sidebar">
                <ul class="list-unstyled navbar__list">
                    <li class="has-sub">
                        <a class="js-arrow" href="#">
                            <i class="fa fa-magnet"></i>产品管理</a>
                        <ul class="list-unstyled navbar__sub-list js-sub-list">
                            <li>
                                <a th:href="@{/selectallproducts}"><i class="fa fa-magnet"></i>产品信息管理</a>
                            </li>
                        </ul>
                    </li>

                    <li class="has-sub">
                        <a class="js-arrow" href="#">
                            <i class="fa fa-cogs"></i>设备管理</a>
                        <ul class="list-unstyled navbar__sub-list js-sub-list">
                            <li>
                                <a th:href="@{selectallequipment}"><i class="fa fa-cogs"></i>设备信息管理</a>
                            </li>
                            <li>
                                <a th:href="@{selectallequipmentproduct}"><i class="fa fa-cogs"></i>产品设备信息管理</a>
                            </li>
                        </ul>
                    </li>

                    <li class="has-sub">
                        <a class="js-arrow" href="#">
                            <i class="fa fa-bell"></i>订单管理</a>
                        <ul class="list-unstyled navbar__sub-list js-sub-list">
                            <li>
                                <a th:href="@{selectallproductorder}"><i class="fa fa-bell"></i>订单信息管理</a>
                            </li>
                        </ul>
                    </li>

                    <li class="has-sub">
                        <a class="js-arrow" href="#">
                            <i class="fa fa-edit (alias)"></i>生产计划管理</a>
                        <ul class="list-unstyled navbar__sub-list js-sub-list">
                            <li>
                                <a th:href="@{selectallproductplan}"><i class="fa fa-edit (alias)"></i>计划信息管理</a>
                            </li>
                        </ul>
                    </li>

                    <li class="has-sub">
                        <a class="js-arrow" href="#">
                            <i class="fa fa-gavel"></i>生产调度管理</a>
                        <ul class="list-unstyled navbar__sub-list js-sub-list">
                            <li>
                                <a th:href="@{selectallproductschedule}"><i class="fa fa-gavel"></i>调度信息管理</a>
                            </li>
                        </ul>
                    </li>
                </ul>
            </nav>
        </div>
    </aside>
    <!-- END MENU SIDEBAR-->

</div>
<!-- PAGE CONTAINER-->
<div class="page-container">
    <!-- HEADER DESKTOP-->
    <header class="header-desktop">
        <div class="section__content section__content--p30">
            <div class="container-fluid">
                <div class="header-wrap">
                    <form class="form-header" action="" method="POST">
                        <input class="au-input au-input--xl" type="text" name="search" placeholder="Search for datas &amp; reports..." />
                        <button class="au-btn--submit" type="submit">
                            <i class="zmdi zmdi-search"></i>
                        </button>
                    </form>
                    <div class="header-button">
                        <div class="account-wrap">
                            <div class="account-item clearfix js-item-menu">
                                <div class="content">
                                    <a class="js-acc-btn" href="#" th:text="${session.user.user_name}"></a>
                                </div>
                                <div class="account-dropdown js-dropdown">
                                    <div class="account-dropdown__footer">
                                        <a th:href="@{deletesession}">
                                            <i class="zmdi zmdi-power"></i>Logout</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </header>

    <div class="main-content">
        <div class="section__content section__content--p30">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-10">
                        <div class="card">
                            <div class="card-header">新建订单</div>
                            <div class="card-body">
                                <div class="card-title">
                                    <h3 class="text-center title-2" style="font-family: Gabriola;font-size: 35px"><U><I>New Order</I></U></h3>
                                </div>
                                <hr>
                                <form th:action="@{/insertproductorder}" method="post" novalidate="novalidate">

                                    <div class="form-group">
                                        <input id="create_userid" name="create_userid" type="hidden" class="form-control cc-number identified visa" th:value="1" data-val="true"
                                               data-val-required="Please enter the date" data-val-cc-number="Please enter a date"
                                               autocomplete="cc-number">
                                        <span class="help-block" data-valmsg-for="cc-number" data-valmsg-replace="true"></span>
                                    </div>

                                    <div class="form-group">
                                        <input id="update_userid" name="update_userid" type="hidden" class="form-control cc-number identified visa" th:value="1" data-val="true"
                                               data-val-required="Please enter the date" data-val-cc-number="Please enter a date"
                                               autocomplete="cc-number">
                                        <span class="help-block" data-valmsg-for="cc-number" data-valmsg-replace="true"></span>
                                    </div>

                                    <div class="form-group">
                                        <label for="product_id">产品ID</label>
                                        <select class="form-control" name="product_id" id="product_id">
                                            <option selected hidden="hidden">请选择产品ID</option>
                                            <option th:each="productId:${productIds}" th:text="${productId}" th:value="${productId}"></option>
                                        </select>
                                    </div>

                                    <div class="form-group has-success">
                                        <label for="product_count" class="control-label mb-1">产品数量</label>
                                        <input id="product_count" name="product_count" type="text" class="form-control cc-name valid" data-val="true" data-val-required="Please enter the name on card"
                                               autocomplete="cc-name" aria-required="true" aria-invalid="false" aria-describedby="cc-name-error">
                                        <span class="help-block field-validation-valid" data-valmsg-for="cc-name" data-valmsg-replace="true"></span>
                                    </div>

                                    <div class="form-group has-success">
                                        <label for="end_date" class="control-label mb-1">订单截止日期</label>
                                        <input id="end_date" name="end_date" type="text" class="form-control cc-name valid" data-val="true" data-val-required="Please enter the name on card"
                                               autocomplete="cc-name" aria-required="true" aria-invalid="false" aria-describedby="cc-name-error">
                                        <span class="help-block field-validation-valid" data-valmsg-for="cc-name" data-valmsg-replace="true"></span>
                                    </div>

                                    <div class="form-group">
                                        <label for="order_status">订单状态</label>
                                        <select class="form-control" name="order_status" id="order_status">
                                            <option selected hidden="hidden" th:value="10">请选择订单状态</option>
                                            <option th:text="未接单" th:value="10"></option>
                                            <option th:text="已接单" th:value="20"></option>
                                            <option th:text="已拒绝" th:value="30"></option>
                                            <option th:text="生产中" th:value="40"></option>
                                            <option th:text="订单完成" th:value="50"></option>
                                        </select>
                                    </div>

                                    <div class="form-group">
                                        <label for="flag">是否有效</label>
                                        <select class="form-control" name="flag" id="flag">
                                            <option selected hidden="hidden" th:value="1">默认有效</option>
                                            <option th:text="有效" th:value="0"></option>
                                            <option th:text="无效" th:value="1"></option>
                                        </select>
                                    </div>

                                    <div class="form-group has-success">
                                        <label for="factory_id" class="control-label mb-1">工厂ID</label>
                                        <input id="factory_id" name="factory_id" type="text" class="form-control cc-name valid" data-val="true" data-val-required="Please enter the name on card"
                                               autocomplete="cc-name" aria-required="true" aria-invalid="false" aria-describedby="cc-name-error">
                                        <span class="help-block field-validation-valid" data-valmsg-for="cc-name" data-valmsg-replace="true"></span>
                                    </div>

                                    <div>
                                        <button id="order-button" type="submit" class="btn btn-lg btn-info btn-block">
                                            <i class="fa fa-lock fa-lg"></i>&nbsp;
                                            <span id="order-button-sure">确认添加</span>
                                            <span id="order-button-sending" style="display:none;">Sending…</span>
                                        </button>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>





<!-- Jquery JS-->
<script th:src="@{vendor/jquery-3.2.1.min.js}"></script>
<!-- Bootstrap JS-->
<script th:src="@{vendor/bootstrap-4.1/popper.min.js}"></script>
<script th:src="@{vendor/bootstrap-4.1/bootstrap.min.js}"></script>
<!-- Vendor JS       -->
<script th:src="@{vendor/slick/slick.min.js}">
</script>
<script th:src="@{vendor/wow/wow.min.js}"></script>
<script th:src="@{vendor/animsition/animsition.min.js}"></script>
<script th:src="@{vendor/bootstrap-progressbar/bootstrap-progressbar.min.js}">
</script>
<script th:src="@{vendor/counter-up/jquery.waypoints.min.js}"></script>
<script th:src="@{vendor/counter-up/jquery.counterup.min.js}">
</script>
<script th:src="@{vendor/circle-progress/circle-progress.min.js}"></script>
<script th:src="@{vendor/perfect-scrollbar/perfect-scrollbar.js}"></script>
<script th:src="@{vendor/chartjs/Chart.bundle.min.js}"></script>
<script th:src="@{vendor/select2/select2.min.js}">
</script>

<!-- Main JS-->
<script th:src="@{js/main.js}"></script>


<!-- Main JS-->
<script src="js/main.js"></script>

</body>
</html>